package com.longma.server.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;


@Data
@Accessors(chain = true)
@ApiModel(value="省市树结构", description="")
public class AddressTree {
    private static final long serialVersionUID=1L;
    //ID
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    //父类ID
    private Integer parentId;

    //层次，0：省，1：市，2：区
    private Integer levels;

    //名称
    private String name;

    @TableField(exist=false)
    private List<AddressTree> children;
}
